﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BookingFIT.aspx.cs" Inherits="JinJiang.BookingEngine.Web.en.BookingFIT" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script language="JavaScript" src="JS/JSDateFunction.js" type="text/javascript"></script>
    <script language="javascript" src="JS/calendar.js" type="text/javascript"></script>
    <script language="javascript" src="JS/resetiframe.js" type="text/javascript"></script>
    <style runat="server" id="csscontrel"></style>
    <meta name="keywords" content="reservation,booking,hotel,hubs1,booking engine" />
    <script type="text/javascript" language="javascript">
        function ShowDate(v) {
            if (v.id == document.getElementById('txtStartTime').id) {
                Value = document.getElementById('txtStartTime').value.split('-')
                var day = Value[2];
                var month = parseInt(getMonth(Value[1]), 10);
                var year = Value[0];
                document.getElementById('txtDepTime').value = addDate('4', 1, year + '/' + month + '/' + day);
                showCalendar('dimg2', false, 'txtDepTime', 'txtStartTime', null);
            }
            else {
                showCalendar('dimg2', false, 'txtDepTime', 'txtStartTime', null);
            }
        }
        function DateValidate() {
            var d1 = document.getElementById('txtStartTime').value.split('-');
            var d2 = document.getElementById('txtDepTime').value.split('-');
            var today = new Date();
            var yesterday = today.getDate() - 1;
            var Date1 = new Date(d1[0] + "/" + d1[1] + "/" + d1[2]);
            if (Date1 < yesterday) {
                alert('Checkin date must be greater than or equals today.');
                document.getElementById("<%= txtStartTime.ClientID %>").value = addDate(today.getFullYear(), today.getMonth() + 1, today.getDate());
                document.getElementById("<%= txtDepTime.ClientID %>").value = addDate(today.getFullYear(), today.getMonth() + 1, today.getDate() + 1);
                return false;
            } var Date2 = new Date(d2[0] + "/" + d2[1] + "/" + d2[2]);
            Date1.setDate(Date1.getDate() + 30);
            if (Date2 > Date1) {
                alert('Reservation date must be within 30 days');
                document.getElementById('txtDepTime').value = "";
                return false;
            }
            return true;
        }
        function addDate(year, month, day) {
            var today = new Date(year, month - 1, day);
            today.setDate(today.getDate() + 1);
            return (today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate());
        }
        function getMonth(mon) {
            if (mon == "1")
                return "Jan";
            if (mon == "2")
                return "Feb";
            if (mon == "3")
                return "Mar";
            if (mon == "4")
                return "Apr";
            if (mon == "5")
                return "May";
            if (mon == "6")
                return "Jun";
            if (mon == "7")
                return "Jul";
            if (mon == "8")
                return "Aug";
            if (mon == "9")
                return "Sept";
            if (mon == "10")
                return "Oct";
            if (mon == "11")
                return "Nov";
            if (mon == "12")
                return "Dec";

            if (mon == "Jan")
                return "1";
            if (mon == "Feb")
                return "2";
            if (mon == "Mar")
                return "3";
            if (mon == "Apr")
                return "4";
            if (mon == "May")
                return "5";
            if (mon == "Jun")
                return "6";
            if (mon == "Jul")
                return "7";
            if (mon == "Aug")
                return "8";
            if (mon == "Sept")
                return "9";
            if (mon == "Oct")
                return "10";
            if (mon == "Nov")
                return "11";
            if (mon == "Dec")
                return "12";
        }


    </script>
    <style type="text/css">
        #divRate a
        {
            color: #186987;
        }
    </style>
</head>
<body runat="server" id="bodyBooking">
    <form id="form1" runat="server">
    <p>&nbsp; </p>
    <table height="129" class="table_other">
        <tr>
            <td rowspan="2">
                <table width="125" border="0" cellspacing="4">
                    <tr>
                        <td colspan="2">
                            Check-in:
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            <asp:TextBox ID="txtStartTime" onpropertychange="return ShowDate(this)" onFocus="this.blur()" runat="server" Columns="8"></asp:TextBox>
                        </td>
                        <td width="25">
                            <a onclick="event.cancelBubble=true;" href="javascript:showCalendar('dimg1',false,'txtStartTime','txtStartTime',null);">
                                <img src="images/calendar.gif" name="dimg1" width="25" height="20" border="0" align="absmiddle" id="dimg1" /></a>
                        </td>
                    </tr>
                </table>
            </td>
            <td rowspan="2">
                <table width="125" border="0" cellspacing="4">
                    <tr>
                        <td colspan="2">
                            <span lang="EN-US">Check-out:</span>
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            <asp:TextBox ID="txtDepTime" runat="server" onFocus="this.blur()" Columns="8"></asp:TextBox>
                        </td>
                        <td width="25">
                            <a onclick="event.cancelBubble=true;" href="javascript:ShowDate(this)">
                                <img src="images/calendar.gif" name="dimg2" width="25" height="20" border="0" align="absmiddle" id="dimg2" /></a>
                        </td>
                    </tr>
                </table>
            </td>
            <td rowspan="2">
                <table width="100" border="0" cellspacing="4">
                    <tr>
                        <td>
                            Persons/room
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:DropDownList ID="dropAdult" runat="server">
                                <asp:ListItem Selected="True" Value="1">1</asp:ListItem>
                                <asp:ListItem Value="2">2</asp:ListItem>
                                <asp:ListItem Value="3">3</asp:ListItem>
                                <asp:ListItem Value="4">4</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </td>
            <td rowspan="2">
                <table width="60" border="0" cellspacing="4">
                    <tr>
                        <td>
                            Rooms:
                            <input name="dropChild" id="dropChild" type="hidden" value="0" style="width: 50px" />
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 24px">
                            <asp:DropDownList ID="dropRoom" runat="server">
                                <asp:ListItem Selected="True" Value="1">1</asp:ListItem>
                                <asp:ListItem Value="2">2</asp:ListItem>
                                <asp:ListItem Value="3">3</asp:ListItem>
                                <asp:ListItem Value="4">4</asp:ListItem>
                                <asp:ListItem Value="5">5</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </td>
            <td rowspan="2">
                <asp:CheckBox ID="chkall" runat="server" Text="all price"></asp:CheckBox>
            </td>
            <td rowspan="2">
                <div align="center">
                    <asp:HiddenField ID="hdfpropertyID" runat="server" />
                    <a href="javascript:void(0);" onclick="SearchHotel()">
                        <img src="images/button_search.gif" width="66" height="20" border="0" id="IMG1"></a></div>
            </td>
        </tr>
    </table>
    <br />
    <br />
    <!--Loading-->
    <div id="loadinfo" align="center" style="display: none;">
        Loading... please wait<br />
        <img src="images/loading.gif" alt="Loading" />
        <br />
    </div>
    <div id="loadErrinfo" align="center" style="display: none;">
        Error...please refresh this page and try again<br />
        <br />
    </div>
    <div id="loadTimeoutinfo" align="center" style="display: none;">
        Timeout ...please refresh this page and try again<br />
        <br />
    </div>
    <!--Loading结束-->
    <div id="divRate" runat="server">
    </div>
    <p>&nbsp; </p>
    <p>&nbsp; </p>
    <p>&nbsp; </p>
    <p>&nbsp; </p>
    <p>&nbsp; </p>
    <p runat="server" id="p1"></p>
    </form>
    <asp:Panel ID="googlejs" runat="server" Visible="false">
        <script type="text/javascript">
            var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
            document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
        </script>
        <script type="text/javascript">
            try {
                var pageTracker = _gat._getTracker("UA-10768010-1");
                pageTracker._trackPageview();
            } catch (err) { }</script>
    </asp:Panel>
</body>
</html>
